package club.xinghe.provider.service.impl;

import club.xinghe.api.entity.User;
import club.xinghe.api.service.UserService;
import club.xinghe.provider.dao.UserMapper;
import com.alibaba.dubbo.config.annotation.Service;

import javax.annotation.Resource;
import java.util.List;
@Service(timeout = 10000)//alibaba的Service，不是spring的
public class UserServiceImpl implements UserService {
    @Resource
    private UserMapper userMapper;//注入

    @Override
    public List<User> getAllUser() {
        return userMapper.getAllUser();
    }
    //生成set&get方法
    public UserMapper getUserMapper() {
        return userMapper;
    }

    public void setUserMapper(UserMapper userMapper) {
        this.userMapper = userMapper;
    }
}
